import React from 'react';

const Counter = ({data, actions, jumpTo }) => {
  const { number } = data;
  const { countIncrease, countDescrease, countIncreaseAsync } = actions;

  return (
    <div>
      <button onClick={countDescrease}>-</button>
      <span>{ number }</span>
      <button onClick={ countIncrease }> + </button>
      <button onClick={ jumpTo }>JumpTo Bar</button>
      <button onClick={ countIncreaseAsync }>Async +</button>
    </div>
  );
};

export default Counter;
